package com.hust.edu.cn.controller;


import com.hust.edu.cn.service.PictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  照片墙页面显示控制器
 * </p>
 *
 * @author Yu Jian
 * @since 2021-07-06
 */
@RestController
@RequestMapping("/picture")
public class PictureShowController {
    @Autowired
    private PictureService pictureService;

    @GetMapping("/picture")
    public String friends(Model model) {
        model.addAttribute("pictures",pictureService.listPicture());
        return "picture";
    }

}

